package com.qtcm.nas.cxm.bendianpinglun.service.impl;

import com.qtcm.nas.cxm.bendianpinglun.dao.ICommentDao;
import com.qtcm.nas.cxm.bendianpinglun.pojo.Comment_form;
import com.qtcm.nas.cxm.bendianpinglun.pojo.Orders;
import com.qtcm.nas.cxm.bendianpinglun.service.ICommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentService implements ICommentService {
    @Autowired
    private ICommentDao commentDao;

    @Override
    public List<Orders> findAll() {
        return commentDao.findAll();
    }

    @Override
    public Orders findById(int id) {
        return commentDao.findById(id);
    }

    @Override
    public void addComment(Comment_form commentForm) {
        commentDao.addComment(commentForm);
    }

    @Override
    public List<Comment_form> findAllPageCom(Integer pageNum, Integer pageSize) {
        return commentDao.findAllPageCom(pageNum, pageSize);
    }

    @Override
    public List<Comment_form> findAllCom() {
        return commentDao.findAllCom();
    }

    @Override
    public List<Comment_form> findHp() {
        return commentDao.findHp();
    }

    @Override
    public List<Comment_form> findCp() {
        return commentDao.findCp();
    }

    @Override
    public Comment_form findOneCom(int cid) {
        return commentDao.findOneCom(cid);
    }

    @Override
    public Long countHp() {
        return commentDao.countHp();
    }

    @Override
    public Long countCp() {
        return commentDao.countCp();
    }
}
